﻿using Autofac;
using SXICE.Core.Helpers;
using SXICE.Core.Infrastructure;
using SXICE.Core.Models;
using SXICE.IRepository;

namespace SXICE.Repository
{
    /// <summary>
    /// 模块注册器
    /// </summary>
    public class ModuleRegister : IModule
    {
        public ModuleInfo GetModuleInfo()
        {
            return new ModuleInfo
            {
                Author = "ts",
                Description = "默认仓储"
            };
        }

        public void Init()
        {
        }

        public void Register(ContainerBuilder container)
        {
            container.RegisterType<DoctorRepository>().As<IDoctorRepository>().InstancePerLifetimeScope();
            container.RegisterType<RightsRepository>().As<IRightsRepository>().InstancePerLifetimeScope();
            container.RegisterType<MenuRepostiory>().As<IMenuRepository>().InstancePerLifetimeScope();
        }

        public void Start()
        {
        }

        public void Stop()
        {
        }
    }
}